STEP 10: Let's tell the player that they won if they picked "paper" and the computer picked "rock".

Use the other if statements as a guide to help you through these. Change the names and values in the if statement.

  • Add an if and statement that tests if choice equals "paper" and computer_choice equals "rock".
  • Drag out Set Text. Assign the command to the result text.
  • Change the string to "Player wins!" since paper beats rock.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)